package com.indexingsystem.boss.common;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlTransient;

import com.fasterxml.jackson.databind.Module;

public class Permission implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7251547473086038823L;
	/**
	 * 权限名称
	 */
	private String name;
	/**
	 * 权限编码
	 */
	private String code;
	/**
	 * 权限路径控制路径（支持通配符（*），多路径可以都好分割，如/user/info/**,/user/update）
	 */
	private String path;
	/**
	 * 权限说明
	 */
	private String describes;
	/**
	 * 模块
	 */
	@XmlTransient
	private Module module;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getDescribes() {
		return describes;
	}

	public void setDescribes(String describes) {
		this.describes = describes;
	}

	public Module getModule() {
		return module;
	}

	public void setModule(Module module) {
		this.module = module;
	}

	public Permission() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Permission(String name, String code, String path, String describes,
			Module module) {
		super();
		this.name = name;
		this.code = code;
		this.path = path;
		this.describes = describes;
		this.module = module;
	}

	@Override
	public String toString() {
		return "Permission [name=" + name + ", code=" + code + ", path=" + path
				+ ", describes=" + describes + ", module=" + module + "]";
	}

}